import { request } from '@/framework/utils/request-jdz';

// 获取样本类型
export const getSampleType = (params) => {
  return request(
    {
      url: 'specimenType',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

// 添加样本类型
export const addSampleType = (params: { classify: string; status: 0 | 1; value: string }) => {
  return request(
    {
      url: 'specimenType',
      method: 'post',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

// 更新样本类型
export const updateSampleType = (id, params: { classify: string; status: 0 | 1; value: string }) => {
  return request(
    {
      url: `specimenType/${id}`,
      method: 'put',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

// 删除样本类型
export const delSampleType = (id) => {
  return request(
    {
      url: `specimenType${id}`,
      method: 'delete',
    },
    {
      isGetDataDirectly: false,
    },
  );
};
